﻿#ifndef COMMONSETFORM_H
#define COMMONSETFORM_H

/*
* @author   Puuck
* @date     2020-10-15
*/

#include <QWidget>

#include "AiPtuStruct.h"
#include <QJsonObject>
class QLabel;
namespace Ui
{
    class CommonSetForm;
}

class CommonSetForm : public QWidget
{
    Q_OBJECT

public:
    explicit CommonSetForm(QWidget* parent = nullptr);
    ~CommonSetForm();

public slots:

    void on_btn_getdevinfo_clicked();

    void on_btn_getNetParam_clicked();

    void on_btn_setNetwork_clicked();

    void on_btn_rebootPro_clicked();

    void on_btn_rebootDev_clicked();

    void on_btn_GetDeviceRunInfo_clicked();

    void onGetDeviceInfo(QJsonObject obj);

    void onGetDeviceRunInfo(QJsonObject obj);

    void onGetNetworkParam(QJsonObject obj);

    void onGetAlgoInfo(QJsonObject obj);
private slots:
    void initForm();

    void InputValidator();

    void on_btn_syncTime_clicked();


private:
    Ui::CommonSetForm* ui;
    QString devId;
    bool first;
    QString mod_info;
    QLabel* lab_info;

signals:
    void sigSendParam(QString method, QJsonObject body);
};

#endif    // COMMONSETFORM_H
